package com.glory.gloryquickui.activity

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.glory.gloryquickui.R
import kotlinx.android.synthetic.main.activity_list.*

class ListActivity : AppCompatActivity(),View.OnClickListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_list)
        tvDemo1.setOnClickListener(this)
        tvDemo2.setOnClickListener(this)
        tvDemo3.setOnClickListener(this)
        tvDemo4.setOnClickListener(this)
    }

    override fun onClick(p0: View?) {
        when(p0?.id){
            R.id.tvDemo1 ->{
            }
            R.id.tvDemo2 ->{
            }
            R.id.tvDemo3 ->{
            }
            R.id.tvDemo4->{
                val intent = Intent(this,DemoActivity::class.java)
                intent.putExtra("json","7ccb4a1447264079b62c400c337731ac")
                startActivity(intent)
            }
        }
    }
}